<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.servlet.*,hyl.core.*,hyl.ext.base.*"%>
<%
/* 
需要登录页面的头部
系统全局变量定义区
*/

String SYSTEMNAME = My.s系统名称;
String path = request.getContextPath();
String basePath = Response.getBasePath(request);
String url_前缀 =  C路由器.g路由("前缀",request);

String url_login = C路由器.g路由("登录",request);
String url_main =  C路由器.g路由("主页",request);
String url_reg = C路由器.g路由("注册",request);
String url_forgot = C路由器.g路由("忘记",request);
String HYLSessionKey = TokenFactory.SessionKey;


MyToken tk = null;
Integer mysession_role = null;

try {
	tk = TokenFactory.getToken(request);
	if (tk == null || tk.getUserId() == null) {
		response.sendRedirect(url_login);
		return;
	} else {
		mysession_role = tk.getRoleid();
	}
} catch (Exception e) {
	response.sendRedirect(url_login);
} // 过滤非法ip
%>
<script type="text/javascript">	
var HYL登录状态="<%=tk.state[0]%>";
const HYLTokeId="<%=tk.token%>";
const BASEPATH= "<%=basePath%>";
const HYLSessionKey = "<%=HYLSessionKey%>";
const URL_前缀 = "<%=url_前缀%>";

var HYL_URLS={};
HYL_URLS.URL_MAIN = "<%=basePath%>"+"<%=url_main%>";
HYL_URLS.URL_LOGIN = "<%=basePath%>"+"<%=url_login%>";
HYL_URLS.URL_REG = "<%=basePath%>"+"<%=url_reg%>";
HYL_URLS.URL_FORGOT="<%=basePath%>"+"<%=url_forgot%>";
</script>
